package com.share.wechat.core.repository.inter;

import com.share.wechat.core.entity.Detail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DetailRepository extends CrudRepository<Detail, String> {
    /**
     * 无条件查找
     *
     * @param pageable 分页
     * @return 结果集
     */
    Page<Detail> findByScore(int score, Pageable pageable);

    /**
     * 根据很多id查找
     *
     * @param ids id集合
     * @return Page
     */
    List<Detail> findByIdIn(List<String> ids);


}
